package cn.xk;//在这里才可以成功启动

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;

/**
 * 启动类
 */
//@EnableAutoConfiguration+@ComponentScan
//开启自动配置及组件扫描
@SpringBootApplication//声明当前类是SpringBoot项目的启动类
@MapperScan("cn.xk.*.mapper")//扫描mapper接口，生成mapper接口的代理对象-service中注入使用
@ServletComponentScan(value = "cn.xk.basic.listener")
public class App {
    public static void main(String[] args) {
        //使用启动类App去运行Spring项目
        SpringApplication.run(App.class);
    }
}